//
//  IComMediator+LoginModuleActions.m
//  ICome
//
//  Created by zhangrongwu on 16/10/14.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "IComMediator+LoginModuleActions.h"

NSString * const kIComMediatorTargetLogin = @"Login";

NSString * const kIComNativeFetchLoginViewController = @"nativeFetchLoginViewController";
NSString * const kIComNativeFetchResetPasswardViewController = @"nativeFetchResetPasswardViewController";
NSString * const kIComNativeFetchEditPasswardViewController = @"nativeFetchEditPasswardViewController";
NSString * const kIComNativeFetchInformationConfirmController = @"nativeFetchInformationConfirmController";
NSString * const kIComNativeFetchActManagerViewController = @"nativeFetchActManagerViewController";



@implementation IComMediator (LoginModuleActions)
- (UIViewController *)IComMediator_LoginViewController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetLogin
                                                    action:kIComNativeFetchLoginViewController
                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

- (UIViewController *)IComMediator_ResetPasswardViewController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetLogin
                                                    action:kIComNativeFetchResetPasswardViewController                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

- (UIViewController *)IComMediator_EditPasswardViewController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetLogin
                                                    action:kIComNativeFetchEditPasswardViewController                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

- (UIViewController *)IComMediator_InformationConfirmController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetLogin
                                                    action:kIComNativeFetchInformationConfirmController                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

- (UIViewController *)IComMediator_ActManagerViewController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetLogin
                                                    action:kIComNativeFetchActManagerViewController                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}
@end
